# -*- coding:utf-8 -*-
from Apps.util.string_util import remove_json_comments2
import logging

logger = logging.getLogger("django")


def interface_json_delete_explanatory(interface_data):
    body_json_type = ["application/json"]
    if interface_data["requestBody"]["type"] in body_json_type and interface_data["requestBody"]["text"]["string"]:
        interface_data["requestBody"]["text"]["string"] = remove_json_comments2(
            interface_data["requestBody"]["text"]["string"])
        return interface_data

    return interface_data
